﻿using System.Collections.Generic;

namespace DeepZoomPivotConstructor.DTBuilderLib
{
    public class DZHotSpotMetaData
    {
        /// <summary>
        /// The hot spot that will be activated when this link "fires".
        /// </summary>
        public DZTalkVisualMetaData LinkLocation { get; set; }

        /// <summary>
        /// List of acctions assoicated with this item
        /// </summary>
        public List<ActionData> Actions { get; set; }

        /// <summary>
        /// Adds a new action to this hot spot data.
        /// </summary>
        /// <param name="data"></param>
        public void Add(ActionData data)
        {
            if (Actions == null)
            {
                Actions = new List<ActionData>();
            }
            Actions.Add(data);
        }

        /// <summary>
        /// The class that contains the data for the actions assoicated with this
        /// hot spot.
        /// </summary>
        public class ActionData
        {
            /// <summary>
            /// The type of the link - for example it might be "url" or "file", etc.
            /// Make sure that SL control can parse whatever you put in here!
            /// </summary>
            public string LinkType { get; set; }

            /// <summary>
            /// The supporting data that is used by the link
            /// </summary>
            public string LinkData { get; set; }

            /// <summary>
            /// True if this hot spot can be activated by a left click.
            /// </summary>
            public bool LinkActivatedByLeftClick { get; set; }

            public enum KeyPressed
            {
                NoKey = 0,
                ArrowUp = 2,
                ArrowDown = 4,
                ArrowLeft = 8,
                ArrowRight = 16
            }

            /// <summary>
            /// What keys can be pressed to activate this link? Use the above
            /// guys to set the meanings
            /// </summary>
            public int LinkActivatedByKeys { get; set; }
        }
    }
}
